/*
 * v4_ch01_for_count.cpp
 *
 *  Created on: 2012-8-28
 *      Author: JamesZOU
 */

#include <iostream>

int for_count()
{
    int sum = 0;

    // sum values from 1 up to 10 inclusive
    for (int val = 1; val <= 10; ++val)
        sum += val;  // equivalent to sum = sum + val

    std::cout << "Sum of 1 to 10 inclusive is "
              << sum << std::endl;

    return 0;
}

//int main(){
//	return for_count();
//}



